Class BaseImportItem
java.lang.Object
io.github.mmm.code.base.item.BaseItem
io.github.mmm.code.base.imports.BaseImportItem
- All Implemented Interfaces:
io.github.mmm.code.api.imports.CodeImportItem, io.github.mmm.code.api.item.CodeItem
public class BaseImportItem
extends BaseItem
implements io.github.mmm.code.api.imports.CodeImportItem
Base implementation of
CodeImportItem (actually specific for TypeScript).- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
Fields inherited from interface io.github.mmm.code.api.imports.CodeImportItem
ITEM_ALLFields inherited from interface io.github.mmm.code.api.item.CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Constructor Summary
ConstructorsConstructorDescriptionBaseImportItem(String item) The constructor.BaseImportItem(String item, String alias) The constructor. -
Method Summary
Methods inherited from class BaseItem
getOwningType, getSourceCode, getSpaces, toString, writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.mmm.code.api.item.CodeItem
getLanguage, getSourceCode, write, write, write, write, write, write
-
Constructor Details
-
BaseImportItem
-
BaseImportItem
-
-
Method Details
-
getItem
- Specified by:
getItemin interfaceio.github.mmm.code.api.imports.CodeImportItem
-
getAlias
- Specified by:
getAliasin interfaceio.github.mmm.code.api.imports.CodeImportItem
-
doWrite
protected void doWrite(Appendable sink, String newline, String defaultIndent, String currentIndent, io.github.mmm.code.api.language.CodeLanguage language) throws IOException - Specified by:
doWritein classBaseItem- Parameters:
sink- theAppendablewhere toappendthe code from thisCodeItem.newline- the newlineString.defaultIndent- theStringused for indentation (e.g. a number of spaces to insert per indent level).currentIndent- the current indent (number of spaces). Initially the empty string (""). Before a recursion thedefaultIndentwill be appended.language- theCodeLanguageto use.- Throws:
IOException- if thrown byAppendable.- See Also:
-