Class BaseMembers<M extends io.github.mmm.code.api.member.CodeMember>
java.lang.Object
io.github.mmm.code.base.item.BaseItem
io.github.mmm.code.base.item.BaseMutableItem
io.github.mmm.code.base.node.BaseNodeItem
io.github.mmm.code.base.node.BaseNodeItemContainer<M>
io.github.mmm.code.base.member.BaseMembers<M>
- Type Parameters:
M- type of the containedBaseMembers.
- All Implemented Interfaces:
io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.item.CodeItem, io.github.mmm.code.api.item.CodeItemWithDeclaringType, io.github.mmm.code.api.item.CodeMutableItem, io.github.mmm.code.api.member.CodeMembers<M>, io.github.mmm.code.api.node.CodeNode, io.github.mmm.code.api.node.CodeNodeContainer<M>, io.github.mmm.code.api.node.CodeNodeItem, io.github.mmm.code.api.node.CodeNodeItemContainer<M>, io.github.mmm.code.api.object.CodeMutable, Iterable<M>
- Direct Known Subclasses:
BaseFields, BaseOperations, BaseProperties
public abstract class BaseMembers<M extends io.github.mmm.code.api.member.CodeMember>
extends BaseNodeItemContainer<M>
implements io.github.mmm.code.api.member.CodeMembers<M>
Base implementation of
CodeMembers.- 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
ConstructorsConstructorDescriptionBaseMembers(BaseMembers<M> template, io.github.mmm.code.api.copy.CodeCopyMapper mapper) The copy-constructor.BaseMembers(BaseType parent) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidabstract BaseMembers<M> copy()protected voiddoWrite(Appendable sink, String newline, String defaultIndent, String currentIndent, io.github.mmm.code.api.language.CodeLanguage language) abstract io.github.mmm.code.api.member.CodeMembers<M> protected voidMethods inherited from class BaseNodeItemContainer
addInternal, clear, doSetImmutable, ensureParent, getByName, getDeclared, getItemCopyType, getKey, getList, getMap, isKeepListView, isNamed, isSystemImmutable, removeMethods inherited from class BaseNodeItem
doInitialize, getContainerItem, getContainerItemDeclared, getContext, getLanguage, getSource, toPathStringMethods inherited from class BaseMutableItem
doCopyNode, doCopyNodeUnsafe, doMapList, doneInitialize, getDefaultCopyMapper, getDefaultEncoding, getReflectiveObject, initialize, initialize, isImmutable, isInitialized, isInitializing, isSystemImmutable, makeImmutable, makeImmutable, setImmutable, setImmutableIfNotSystemImmutable, verifyMutalbe, writeItemMethods 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, 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.CodeNodeContainer
getDeclared, isEmpty, iteratorMethods inherited from interface io.github.mmm.code.api.node.CodeNodeItemContainer
copy, removeMethods inherited from interface io.github.mmm.code.api.CodeWithContext
getContext, getSourceMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
BaseMembers
-
BaseMembers
The copy-constructor.- Parameters:
template- theBaseMembersto copy.mapper- theCodeCopyMapper.
-
-
Method Details
-
getParent
- Specified by:
getParentin interfaceio.github.mmm.code.api.member.CodeMembers<M extends io.github.mmm.code.api.member.CodeMember>- Specified by:
getParentin interfaceio.github.mmm.code.api.node.CodeNode- Specified by:
getParentin interfaceio.github.mmm.code.api.node.CodeNodeItemContainer<M extends io.github.mmm.code.api.member.CodeMember>
-
rename
- Overrides:
renamein classBaseNodeItemContainer<M extends io.github.mmm.code.api.member.CodeMember>- Parameters:
member- the child to rename.oldName- the oldname.newName- the newnameto be set.renamer- theConsumerto actually perform the renaming (that may change theObject.hashCode()of the child).
-
add
- Specified by:
addin interfaceio.github.mmm.code.api.member.CodeMembers<M extends io.github.mmm.code.api.member.CodeMember>- Overrides:
addin classBaseNodeItemContainer<M extends io.github.mmm.code.api.member.CodeMember>- Parameters:
member- the item to add.
-
getDeclaringType
- Specified by:
getDeclaringTypein interfaceio.github.mmm.code.api.item.CodeItemWithDeclaringType
-
getSourceCodeObject
- Overrides:
getSourceCodeObjectin classBaseMutableItem- Returns:
- the optional internal
CodeItemrepresenting the source-code (to merge). Otherwisenull. This is an internal API. Do not use or rely on it from outside.
-
copy
- Specified by:
copyin interfaceio.github.mmm.code.api.member.CodeMembers<M extends io.github.mmm.code.api.member.CodeMember>- Specified by:
copyin interfaceio.github.mmm.code.api.item.CodeMutableItem- Specified by:
copyin interfaceio.github.mmm.code.api.node.CodeNodeItem- Specified by:
copyin interfaceio.github.mmm.code.api.node.CodeNodeItemContainer<M extends io.github.mmm.code.api.member.CodeMember>
-
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:
-