Class BaseNodeItem
java.lang.Object
io.github.mmm.code.base.item.BaseItem
io.github.mmm.code.base.item.BaseMutableItem
io.github.mmm.code.base.node.BaseNodeItem
- All Implemented Interfaces:
io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.item.CodeItem, io.github.mmm.code.api.item.CodeMutableItem, io.github.mmm.code.api.node.CodeNode, io.github.mmm.code.api.node.CodeNodeItem, io.github.mmm.code.api.object.CodeMutable
- Direct Known Subclasses:
BaseAnnotation, BaseBlock, BaseDoc, BaseElement, BaseNodeItemContainer
public abstract class BaseNodeItem
extends BaseMutableItem
implements io.github.mmm.code.api.node.CodeNodeItem
Base implementation of
CodeNodeItem.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
Field Summary
Fields inherited from interface io.github.mmm.code.api.item.CodeItem
DEFAULT_INDENT, DEFAULT_NEWLINE -
Constructor Summary
ConstructorsConstructorDescriptionThe constructor.BaseNodeItem(BaseNodeItem template, io.github.mmm.code.api.copy.CodeCopyMapper mapper) The copy-constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled fromBaseMutableItem.initialize()on first invocation.protected static <I extends io.github.mmm.code.api.item.CodeItem>
IgetContainerItem(BaseNodeItemContainerWithName<I> container, String name, boolean init) protected static <I extends io.github.mmm.code.api.item.CodeItem>
IgetContainerItemDeclared(BaseNodeItemContainerWithName<I> container, String name, boolean init) io.github.mmm.code.api.language.CodeLanguageMethods inherited from class BaseMutableItem
doCopyNode, doCopyNodeUnsafe, doMapList, doneInitialize, doSetImmutable, getDefaultCopyMapper, getDefaultEncoding, getReflectiveObject, getSourceCodeObject, initialize, initialize, isImmutable, isInitialized, isInitializing, isSystemImmutable, isSystemImmutable, makeImmutable, makeImmutable, setImmutable, setImmutableIfNotSystemImmutable, verifyMutalbe, writeItemMethods inherited from class BaseItem
doWrite, 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
getSourceCode, write, write, write, write, write, writeMethods inherited from interface io.github.mmm.code.api.object.CodeMutable
isImmutable, isMutableMethods inherited from interface io.github.mmm.code.api.item.CodeMutableItem
getReflectiveObject, setImmutableMethods inherited from interface io.github.mmm.code.api.node.CodeNode
getParentMethods inherited from interface io.github.mmm.code.api.node.CodeNodeItem
copy, copy
-
Constructor Details
-
BaseNodeItem
public BaseNodeItem()The constructor. -
BaseNodeItem
The copy-constructor.- Parameters:
template- theBaseNodeItemto copy.mapper- theCodeCopyMapper.
-
-
Method Details
-
doInitialize
protected void doInitialize()Called fromBaseMutableItem.initialize()on first invocation. May be overridden but never be called from anywhere else.- Overrides:
doInitializein classBaseMutableItem
-
getContext
- Specified by:
getContextin interfaceio.github.mmm.code.api.CodeWithContext
-
getSource
- Specified by:
getSourcein interfaceio.github.mmm.code.api.CodeWithContext
-
getLanguage
public io.github.mmm.code.api.language.CodeLanguage getLanguage()- Specified by:
getLanguagein interfaceio.github.mmm.code.api.item.CodeItem
-
toPathString
-
getContainerItem
protected static <I extends io.github.mmm.code.api.item.CodeItem> I getContainerItem(BaseNodeItemContainerWithName<I> container, String name, boolean init) - Type Parameters:
I- type of theCodeItem.- Parameters:
container- theBaseNodeItemContainerWithName.name- - seeBaseNodeItemContainerWithName.get(String, boolean).init- - seeBaseNodeItemContainerWithName.get(String, boolean).- Returns:
- see
BaseNodeItemContainerWithName.get(String, boolean).
-
getContainerItemDeclared
protected static <I extends io.github.mmm.code.api.item.CodeItem> I getContainerItemDeclared(BaseNodeItemContainerWithName<I> container, String name, boolean init) - Type Parameters:
I- type of theCodeItem.- Parameters:
container- theBaseNodeItemContainerWithName.name- - seeBaseNodeItemContainerWithName.getDeclared(String, boolean).init- - seeBaseNodeItemContainerWithName.getDeclared(String, boolean).- Returns:
- see
BaseNodeItemContainerWithName.getDeclared(String, boolean).
-