org.eclipse.xtext.xbase.compiler
Class StringBuilderBasedAppendable

java.lang.Object
  extended by org.eclipse.xtext.xbase.compiler.StringBuilderBasedAppendable
All Implemented Interfaces:
IAppendable

public class StringBuilderBasedAppendable
extends java.lang.Object
implements IAppendable


Constructor Summary
StringBuilderBasedAppendable()
           
StringBuilderBasedAppendable(ImportManager typeSerializer)
           
StringBuilderBasedAppendable(ImportManager typeSerializer, java.lang.String indentation)
           
 
Method Summary
 IAppendable append(JvmType type)
           
 IAppendable append(java.lang.String string)
           
protected  void appendType(JvmType type)
           
 void closeScope()
           
 java.lang.String declareVariable(java.lang.Object key, java.lang.String proposedName)
           
 IAppendable decreaseIndentation()
           
protected  java.lang.String findNewName(java.util.Set<java.lang.String> names, java.lang.String proposedName)
           
 java.util.List<java.lang.String> getImports()
           
 java.lang.String getName(java.lang.Object key)
           
 java.lang.Object getObject(java.lang.String name)
           
 IAppendable increaseIndentation()
           
 void openScope()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringBuilderBasedAppendable

public StringBuilderBasedAppendable(ImportManager typeSerializer,
                                    java.lang.String indentation)

StringBuilderBasedAppendable

public StringBuilderBasedAppendable(ImportManager typeSerializer)

StringBuilderBasedAppendable

public StringBuilderBasedAppendable()
Method Detail

append

public IAppendable append(JvmType type)
Specified by:
append in interface IAppendable

append

public IAppendable append(java.lang.String string)
Specified by:
append in interface IAppendable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

increaseIndentation

public IAppendable increaseIndentation()
Specified by:
increaseIndentation in interface IAppendable

decreaseIndentation

public IAppendable decreaseIndentation()
Specified by:
decreaseIndentation in interface IAppendable

openScope

public void openScope()
Specified by:
openScope in interface IAppendable

declareVariable

public java.lang.String declareVariable(java.lang.Object key,
                                        java.lang.String proposedName)
Specified by:
declareVariable in interface IAppendable

findNewName

protected java.lang.String findNewName(java.util.Set<java.lang.String> names,
                                       java.lang.String proposedName)

getName

public java.lang.String getName(java.lang.Object key)
Specified by:
getName in interface IAppendable

getObject

public java.lang.Object getObject(java.lang.String name)
Specified by:
getObject in interface IAppendable

closeScope

public void closeScope()
Specified by:
closeScope in interface IAppendable

appendType

protected void appendType(JvmType type)

getImports

public java.util.List<java.lang.String> getImports()
Specified by:
getImports in interface IAppendable