|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.xbase.compiler.output.TreeAppendable
@NonNullByDefault public class TreeAppendable
Nested Class Summary | |
---|---|
static class |
TreeAppendable.Visitor
A visitor can be used
to manipulate an existing TreeAppendable or to create a completely new one recursively. |
Constructor Summary | |
---|---|
|
TreeAppendable(ImportManager importManager,
ILocationInFileProvider locationProvider,
IJvmModelAssociations jvmModelAssociations,
org.eclipse.emf.ecore.EObject source,
java.lang.String indentation,
java.lang.String lineSeparator)
|
protected |
TreeAppendable(SharedAppendableState state,
ILocationInFileProvider locationProvider,
IJvmModelAssociations jvmModelAssociations,
org.eclipse.emf.ecore.EObject source)
|
protected |
TreeAppendable(SharedAppendableState state,
ILocationInFileProvider locationProvider,
IJvmModelAssociations jvmModelAssociations,
java.util.Set<ILocationData> sourceLocations,
boolean useForDebugging)
|
Method Summary | |
---|---|
void |
accept(java.lang.String text)
|
TreeAppendable |
acceptVisitor(TreeAppendable.Visitor visitor)
|
ITreeAppendable |
append(java.lang.CharSequence content)
|
TreeAppendable |
append(JvmType type)
|
protected void |
appendIndented(java.lang.String text)
|
protected ITreeAppendable |
appendTreeAppendable(ITreeAppendable other)
|
TreeAppendable |
appendUnsafe(java.lang.String string)
|
char |
charAt(int index)
|
protected void |
closeLastChild()
|
void |
closeScope()
|
protected static java.util.Set<ILocationData> |
createAllLocationData(ILocationInFileProvider locationProvider,
IJvmModelAssociations jvmModelAssociations,
org.eclipse.emf.ecore.EObject object,
ILocationInFileProviderExtension.RegionDescription query)
|
protected static ILocationData |
createLocationData(org.eclipse.emf.ecore.EObject object,
ITextRegionWithLineInformation textRegion)
|
protected static ILocationData |
createLocationData(ILocationInFileProvider locationProvider,
org.eclipse.emf.ecore.EObject object,
ILocationInFileProviderExtension.RegionDescription query)
|
java.lang.String |
declareSyntheticVariable(java.lang.Object key,
java.lang.String proposedName)
declares a synthetic variable, where the name is not used in the current or any parent scope. |
java.lang.String |
declareVariable(java.lang.Object key,
java.lang.String proposedName)
|
TreeAppendable |
decreaseIndentation()
|
protected void |
doGetContent(java.lang.StringBuilder result)
|
java.util.List<? extends java.lang.Object> |
getChildren()
Access the children of the TreeAppendable . |
java.lang.String |
getContent()
|
java.util.List<java.lang.String> |
getImports()
|
java.util.Set<ILocationData> |
getLocationData()
|
java.lang.String |
getName(java.lang.Object key)
|
java.lang.Object |
getObject(java.lang.String name)
|
AbstractTraceRegion |
getTraceRegion()
Returns the a trace region. |
boolean |
hasName(java.lang.Object key)
|
boolean |
hasObject(java.lang.String name)
|
TreeAppendable |
increaseIndentation()
|
boolean |
isUseForDebugging()
|
int |
length()
|
protected void |
markClosed()
|
TreeAppendable |
newLine()
|
void |
openPseudoScope()
opens a new variable scope, without having a new Java scope. |
void |
openScope()
opens a new scope, backed up by a real Java Scope |
java.lang.CharSequence |
subSequence(int start,
int end)
|
java.lang.String |
toString()
|
TreeAppendable |
trace(org.eclipse.emf.ecore.EObject object)
same as trace(object, false) |
TreeAppendable |
trace(org.eclipse.emf.ecore.EObject object,
boolean useForDebugging)
|
ITreeAppendable |
trace(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.ecore.EStructuralFeature feature,
int indexInList)
|
TreeAppendable |
trace(org.eclipse.emf.ecore.EObject object,
ILocationInFileProviderExtension.RegionDescription region,
boolean useForDebugging)
|
ITreeAppendable |
trace(ILocationData location)
|
ITreeAppendable |
trace(ILocationData location,
boolean useForDebugging)
|
ITreeAppendable |
trace(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> objects)
|
protected TreeAppendable |
trace(java.util.Set<ILocationData> newData,
boolean useForDebugging)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TreeAppendable(ImportManager importManager, ILocationInFileProvider locationProvider, IJvmModelAssociations jvmModelAssociations, org.eclipse.emf.ecore.EObject source, java.lang.String indentation, java.lang.String lineSeparator)
protected TreeAppendable(SharedAppendableState state, ILocationInFileProvider locationProvider, IJvmModelAssociations jvmModelAssociations, org.eclipse.emf.ecore.EObject source)
protected TreeAppendable(SharedAppendableState state, ILocationInFileProvider locationProvider, IJvmModelAssociations jvmModelAssociations, java.util.Set<ILocationData> sourceLocations, boolean useForDebugging)
Method Detail |
---|
public TreeAppendable trace(org.eclipse.emf.ecore.EObject object)
ITreeAppendable
trace
in interface ITreeAppendable
public TreeAppendable trace(org.eclipse.emf.ecore.EObject object, boolean useForDebugging)
trace
in interface ITreeAppendable
object
- the object this part should be associated withuseForDebugging
- whether the part is relevant for debuggingpublic TreeAppendable trace(org.eclipse.emf.ecore.EObject object, ILocationInFileProviderExtension.RegionDescription region, boolean useForDebugging)
protected TreeAppendable trace(java.util.Set<ILocationData> newData, boolean useForDebugging)
public ITreeAppendable trace(ILocationData location)
trace
in interface ITreeAppendable
public ITreeAppendable trace(ILocationData location, boolean useForDebugging)
trace
in interface ITreeAppendable
location
- the location that should be traceduseForDebugging
- whether the part is relevant for debugging@Nullable protected static ILocationData createLocationData(ILocationInFileProvider locationProvider, org.eclipse.emf.ecore.EObject object, ILocationInFileProviderExtension.RegionDescription query)
protected static java.util.Set<ILocationData> createAllLocationData(ILocationInFileProvider locationProvider, IJvmModelAssociations jvmModelAssociations, org.eclipse.emf.ecore.EObject object, ILocationInFileProviderExtension.RegionDescription query)
public ITreeAppendable trace(java.lang.Iterable<? extends org.eclipse.emf.ecore.EObject> objects)
trace
in interface ITreeAppendable
objects
- the iterable of EObject
s that contribute output. May not be empty.public ITreeAppendable trace(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int indexInList)
trace
in interface ITreeAppendable
protected static ILocationData createLocationData(org.eclipse.emf.ecore.EObject object, ITextRegionWithLineInformation textRegion)
public TreeAppendable acceptVisitor(TreeAppendable.Visitor visitor)
public java.util.Set<ILocationData> getLocationData()
public java.util.List<? extends java.lang.Object> getChildren()
TreeAppendable
. The list contains either strings
or other TreeAppendables
. The list may be empty.
public void accept(@Nullable java.lang.String text)
accept
in interface IAcceptor<java.lang.String>
protected void markClosed()
protected void closeLastChild()
public TreeAppendable append(JvmType type)
append
in interface IAppendable
append
in interface ITreeAppendable
protected ITreeAppendable appendTreeAppendable(ITreeAppendable other)
public ITreeAppendable append(java.lang.CharSequence content)
append
in interface IAppendable
append
in interface ITreeAppendable
public TreeAppendable appendUnsafe(java.lang.String string)
public TreeAppendable newLine()
newLine
in interface IAppendable
newLine
in interface ITreeAppendable
public TreeAppendable increaseIndentation()
increaseIndentation
in interface IAppendable
increaseIndentation
in interface ITreeAppendable
public TreeAppendable decreaseIndentation()
decreaseIndentation
in interface IAppendable
decreaseIndentation
in interface ITreeAppendable
public java.util.List<java.lang.String> getImports()
getImports
in interface IAppendable
public void openScope()
IAppendable
openScope
in interface IAppendable
public void openPseudoScope()
IAppendable
openPseudoScope
in interface IAppendable
public java.lang.String declareVariable(java.lang.Object key, java.lang.String proposedName)
declareVariable
in interface IAppendable
public java.lang.String declareSyntheticVariable(java.lang.Object key, java.lang.String proposedName)
IAppendable
declareSyntheticVariable
in interface IAppendable
public java.lang.String getName(java.lang.Object key)
getName
in interface IAppendable
public boolean hasName(java.lang.Object key)
hasName
in interface IAppendable
public java.lang.Object getObject(java.lang.String name)
getObject
in interface IAppendable
public boolean hasObject(java.lang.String name)
hasObject
in interface IAppendable
public void closeScope()
closeScope
in interface IAppendable
public java.lang.String getContent()
getContent
in interface IAppendable
public char charAt(int index)
charAt
in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in interface IAppendable
toString
in class java.lang.Object
protected void doGetContent(java.lang.StringBuilder result)
public int length()
length
in interface java.lang.CharSequence
length
in interface IAppendable
public AbstractTraceRegion getTraceRegion()
ITraceRegionProvider
getTraceRegion
in interface ITraceRegionProvider
protected void appendIndented(java.lang.String text)
public boolean isUseForDebugging()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |