io.sarl.lang.util
Class ContextAwareTreeAppendable
All Superinterfaces:
org.eclipse.xtext.generator.trace.ITraceRegionProvider, org.eclipse.xtext.xbase.compiler.IAppendable, org.eclipse.xtext.xbase.compiler.ISourceAppender, org.eclipse.xtext.xbase.compiler.output.ITreeAppendable
class ContextAwareTreeAppendable
extends DelegateTreeAppendable
A delegating tree appendable which is aware of th current compilation context.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.8.6
Property Summary
Constructor Summary
Constructor and description
new(ITreeAppendable)
Constructor.
new(Map<K,V>,ITreeAppendable)
Constructor.
Action Summary
Modifier and type Action and description
protected org.eclipse.xtext.xbase.compiler.output.ITreeAppendable createDelegateToChild(ITreeAppendable)
T defineContextualValue(String,Object)
Define a contextual value.
T deleteContextualValue(String)
Define a contextual value.
T getContextualValue(String)
Replies the contextual value associated to the given key.
boolean hasContextualValue(String)
Replies if a contextual value is associated to the given key.
Constructor Details
new(ITreeAppendable)
new(ITreeAppendable)
Constructor.
Parameters:
delegate - the appendable to delegate to.
new(Map<K,V>,ITreeAppendable)
protected new(Map<K,V>,ITreeAppendable)
Constructor.
Parameters:
contextualValues - the contextual values.
delegate - the appendable to delegate to.
Action Details
createDelegateToChild(ITreeAppendable)
protected def createDelegateToChild(ITreeAppendable) : org.eclipse.xtext.xbase.compiler.output.ITreeAppendable
defineContextualValue(String,Object)
def defineContextualValue(String,Object) : T

with T

Define a contextual value.
Parameters:
<T> - the type of the value.
key - the name of the value.
value - the value itself.
Returns:
the previous value associated to the key, or null if none.
deleteContextualValue(String)
def deleteContextualValue(String) : T

with T

Define a contextual value.
Parameters:
<T> - the type of the value.
key - the name of the value.
Returns:
the previous value associated to the key, or null if none.
getContextualValue(String)
def getContextualValue(String) : T

with T

Replies the contextual value associated to the given key.
Parameters:
<T> - the type of the value.
key - the name of the value.
Returns:
the value associated to the key, or null if none.
hasContextualValue(String)
def hasContextualValue(String) : boolean
Replies if a contextual value is associated to the given key.
Parameters:
key - the name of the value.
Returns:
true if a value is associated to the key, or false if none.