org.eclipse.xtend.util.stdlib
Class AbstractStatefulExtensions<T>

java.lang.Object
  extended by org.eclipse.xtend.util.stdlib.AbstractStatefulExtensions<T>
All Implemented Interfaces:
IExecutionContextAware
Direct Known Subclasses:
CounterExtensions, ElementPropertiesExtensions, GlobalVarExtensions, UIDHelper, XMLReaderHelper

public class AbstractStatefulExtensions<T>
extends java.lang.Object
implements IExecutionContextAware

uses the global vars of an Xpand ExecutionContext to attach state to any object

Author:
Sven Efftinge - Initial contribution and API

Field Summary
protected  ExecutionContext exeCtx
           
 
Constructor Summary
AbstractStatefulExtensions()
           
 
Method Summary
protected  T get(java.lang.Object o)
           
protected  T getDefault(java.lang.Object o)
           
protected  java.lang.String getKey()
           
protected  java.util.Map<java.lang.Object,T> getVars()
           
protected  java.util.Map<java.lang.Object,T> newMap()
           
protected  T set(java.lang.Object o, T value)
           
 void setExecutionContext(ExecutionContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exeCtx

protected ExecutionContext exeCtx
Constructor Detail

AbstractStatefulExtensions

public AbstractStatefulExtensions()
Method Detail

set

protected T set(java.lang.Object o,
                T value)

get

protected T get(java.lang.Object o)

getDefault

protected T getDefault(java.lang.Object o)

getVars

protected java.util.Map<java.lang.Object,T> getVars()

newMap

protected java.util.Map<java.lang.Object,T> newMap()

getKey

protected java.lang.String getKey()

setExecutionContext

public void setExecutionContext(ExecutionContext ctx)
Specified by:
setExecutionContext in interface IExecutionContextAware