org.globus.cog.karajan.util
Class DefUtil

java.lang.Object
  extended by org.globus.cog.karajan.util.DefUtil

public class DefUtil
extends Object


Field Summary
static String ENV
           
static String ENV_CACHE
           
static org.apache.log4j.Logger logger
           
 
Constructor Summary
DefUtil()
           
 
Method Summary
static void addDef(VariableStack stack, StackFrame where, String prefix, String name, Object def)
           
static DefList.Entry getDef(VariableStack stack, String type, FlowElement parent)
           
static void updateEnvCache(VariableStack stack, StackFrame frame)
          The environment cache is used to optimize the capturing of environments when defining elements It is necessary because stack.copy() is a costly operation This method does not initialize it, but it marks on a specific frame that any parent caches would be invalid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final org.apache.log4j.Logger logger

ENV_CACHE

public static final String ENV_CACHE
See Also:
Constant Field Values

ENV

public static final String ENV
See Also:
Constant Field Values
Constructor Detail

DefUtil

public DefUtil()
Method Detail

addDef

public static void addDef(VariableStack stack,
                          StackFrame where,
                          String prefix,
                          String name,
                          Object def)

updateEnvCache

public static void updateEnvCache(VariableStack stack,
                                  StackFrame frame)
The environment cache is used to optimize the capturing of environments when defining elements It is necessary because stack.copy() is a costly operation This method does not initialize it, but it marks on a specific frame that any parent caches would be invalid. It is not initialized because there is no guarantee that an element would be defined in this environment, therefore the caching may be useless. A lambda, if it finds an empty cache, should update it with a copy of the stack up to the frame in cause and from the closest barrier. It should also link with the previous environment.


getDef

public static DefList.Entry getDef(VariableStack stack,
                                   String type,
                                   FlowElement parent)
                            throws ExecutionException
Throws:
ExecutionException