org.eclipse.m2m.atl.engine.ocl
Class OclHelper

java.lang.Object
  extended by org.eclipse.m2m.atl.engine.ocl.OclEvaluator
      extended by org.eclipse.m2m.atl.engine.ocl.OclHelper

public class OclHelper
extends OclEvaluator

An helper for the OCL evaluator.


Field Summary
protected  java.lang.String helper
           
protected  java.util.List parameters
           
 
Fields inherited from class org.eclipse.m2m.atl.engine.ocl.OclEvaluator
pbs
 
Constructor Summary
OclHelper(java.lang.String helper, java.util.List parameters)
          Constructor.
 
Method Summary
 ASM compile()
          Compiles the current helper.
 java.lang.Object eval(java.util.List arguments)
          Evaluates the helper with the given arguments.
 java.lang.Object eval(java.util.List arguments, java.util.Map models)
          Evaluates the helper with the given arguments and a models map.
static java.lang.Object eval(java.lang.String helper, java.util.Map arguments)
          Evaluates the helper with the given arguments.
 
Methods inherited from class org.eclipse.m2m.atl.engine.ocl.OclEvaluator
compile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helper

protected java.lang.String helper

parameters

protected java.util.List parameters
Constructor Detail

OclHelper

public OclHelper(java.lang.String helper,
                 java.util.List parameters)
Constructor.

Parameters:
helper - the helper code
parameters - the helper parameters
Method Detail

eval

public static java.lang.Object eval(java.lang.String helper,
                                    java.util.Map arguments)
                             throws java.lang.Exception
Evaluates the helper with the given arguments.

Parameters:
helper - the helper
arguments - the values map
Returns:
the helper evaluation result
Throws:
java.lang.Exception

compile

public ASM compile()
            throws java.io.IOException
Compiles the current helper.

Returns:
the compiled helper in an ASM form
Throws:
java.io.IOException

eval

public java.lang.Object eval(java.util.List arguments)
                      throws java.lang.Exception
Evaluates the helper with the given arguments.

Parameters:
arguments - the given arguments
Returns:
the result
Throws:
java.lang.Exception

eval

public java.lang.Object eval(java.util.List arguments,
                             java.util.Map models)
                      throws java.lang.Exception
Evaluates the helper with the given arguments and a models map.

Parameters:
arguments - the given arguments
models - the models map
Returns:
the result
Throws:
java.lang.Exception

Copyright 2007 IBM Corporation and others.
All Rights Reserved.