Class BaseParameters
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<io.github.mmm.code.api.arg.CodeParameter>
io.github.mmm.code.base.node.BaseNodeItemContainerFlat<io.github.mmm.code.api.arg.CodeParameter>
io.github.mmm.code.base.arg.BaseOperationArgs<io.github.mmm.code.api.arg.CodeParameter>
io.github.mmm.code.base.arg.BaseParameters
- All Implemented Interfaces:
io.github.mmm.code.api.arg.CodeOperationArgs<io.github.mmm.code.api.arg.CodeParameter>, io.github.mmm.code.api.arg.CodeParameters, io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.copy.CodeNodeItemCopyable<io.github.mmm.code.api.member.CodeOperation, io.github.mmm.code.api.arg.CodeParameters>, 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.merge.CodeMergeableItem<io.github.mmm.code.api.arg.CodeParameters>, io.github.mmm.code.api.merge.CodeSimpleMergeableItem<io.github.mmm.code.api.arg.CodeParameters>, io.github.mmm.code.api.node.CodeNode, io.github.mmm.code.api.node.CodeNodeContainer<io.github.mmm.code.api.arg.CodeParameter>, io.github.mmm.code.api.node.CodeNodeItem, io.github.mmm.code.api.node.CodeNodeItemContainer<io.github.mmm.code.api.arg.CodeParameter>, io.github.mmm.code.api.node.CodeNodeItemContainerFlat<io.github.mmm.code.api.arg.CodeParameter>, io.github.mmm.code.api.node.CodeNodeItemContainerFlatWithName<io.github.mmm.code.api.arg.CodeParameter>, io.github.mmm.code.api.node.CodeNodeItemContainerWithName<io.github.mmm.code.api.arg.CodeParameter>, io.github.mmm.code.api.object.CodeMutable, Iterable<io.github.mmm.code.api.arg.CodeParameter>
public class BaseParameters
extends BaseOperationArgs<io.github.mmm.code.api.arg.CodeParameter>
implements io.github.mmm.code.api.arg.CodeParameters
Base implementation of
CodeParameters.- 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
ConstructorsConstructorDescriptionBaseParameters(BaseParameters template, io.github.mmm.code.api.copy.CodeCopyMapper mapper) The copy-constructor.BaseParameters(BaseOperation parent) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionio.github.mmm.code.api.arg.CodeParametercopy()copy(io.github.mmm.code.api.copy.CodeCopyMapper mapper) protected voidCalled fromBaseMutableItem.initialize()on first invocation.protected voiddoWrite(Appendable sink, String newline, String defaultIndent, String currentIndent, io.github.mmm.code.api.language.CodeLanguage language) io.github.mmm.code.api.arg.CodeParametergetDeclared(String name) io.github.mmm.code.api.arg.CodeParametersio.github.mmm.code.api.arg.CodeParametersmerge(io.github.mmm.code.api.arg.CodeParameters o, io.github.mmm.code.api.merge.CodeMergeStrategy strategy) protected voidrename(io.github.mmm.code.api.arg.CodeParameter child, String oldName, String newName, Consumer<String> renamer) Methods inherited from class BaseOperationArgs
getDeclaringType, getParentMethods inherited from class BaseNodeItemContainer
add, addInternal, clear, doSetImmutable, ensureParent, getByName, getDeclared, getItemCopyType, getKey, getList, getMap, isKeepListView, isNamed, isSystemImmutable, removeMethods inherited from class BaseNodeItem
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.item.CodeItemWithDeclaringType
getDeclaringTypeMethods 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
removeMethods inherited from interface io.github.mmm.code.api.node.CodeNodeItemContainerFlatWithName
getMethods inherited from interface io.github.mmm.code.api.node.CodeNodeItemContainerWithName
getDeclaredOrCreate, getOrCreate, getRequiredMethods inherited from interface io.github.mmm.code.api.copy.CodeNodeItemCopyable
getParentMethods inherited from interface io.github.mmm.code.api.arg.CodeOperationArgs
getParentMethods inherited from interface io.github.mmm.code.api.arg.CodeParameters
isInvokable, isInvokableMethods inherited from interface io.github.mmm.code.api.merge.CodeSimpleMergeableItem
mergeMethods inherited from interface io.github.mmm.code.api.CodeWithContext
getContext, getSourceMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
BaseParameters
-
BaseParameters
The copy-constructor.- Parameters:
template- theBaseParametersto copy.mapper- theCodeCopyMapper.
-
-
Method Details
-
doInitialize
protected void doInitialize()Description copied from class:BaseNodeItemCalled fromBaseMutableItem.initialize()on first invocation. May be overridden but never be called from anywhere else.- Overrides:
doInitializein classBaseNodeItem
-
getDeclared
- Specified by:
getDeclaredin interfaceio.github.mmm.code.api.node.CodeNodeItemContainerWithName<io.github.mmm.code.api.arg.CodeParameter>
-
add
- Specified by:
addin interfaceio.github.mmm.code.api.node.CodeNodeItemContainerWithName<io.github.mmm.code.api.arg.CodeParameter>
-
getSourceCodeObject
public io.github.mmm.code.api.arg.CodeParameters getSourceCodeObject()- Specified by:
getSourceCodeObjectin classBaseOperationArgs<io.github.mmm.code.api.arg.CodeParameter>- 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.
-
rename
protected void rename(io.github.mmm.code.api.arg.CodeParameter child, String oldName, String newName, Consumer<String> renamer) - Overrides:
renamein classBaseNodeItemContainer<io.github.mmm.code.api.arg.CodeParameter>- Parameters:
child- 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).
-
merge
public io.github.mmm.code.api.arg.CodeParameters merge(io.github.mmm.code.api.arg.CodeParameters o, io.github.mmm.code.api.merge.CodeMergeStrategy strategy) - Specified by:
mergein interfaceio.github.mmm.code.api.merge.CodeSimpleMergeableItem<io.github.mmm.code.api.arg.CodeParameters>
-
copy
- 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<io.github.mmm.code.api.arg.CodeParameter>- Specified by:
copyin interfaceio.github.mmm.code.api.node.CodeNodeItemContainerFlat<io.github.mmm.code.api.arg.CodeParameter>- Specified by:
copyin interfaceio.github.mmm.code.api.node.CodeNodeItemContainerFlatWithName<io.github.mmm.code.api.arg.CodeParameter>- Specified by:
copyin interfaceio.github.mmm.code.api.node.CodeNodeItemContainerWithName<io.github.mmm.code.api.arg.CodeParameter>- Specified by:
copyin interfaceio.github.mmm.code.api.copy.CodeNodeItemCopyable<io.github.mmm.code.api.member.CodeOperation, io.github.mmm.code.api.arg.CodeParameters>- Specified by:
copyin interfaceio.github.mmm.code.api.arg.CodeOperationArgs<io.github.mmm.code.api.arg.CodeParameter>- Specified by:
copyin interfaceio.github.mmm.code.api.arg.CodeParameters- Specified by:
copyin classBaseOperationArgs<io.github.mmm.code.api.arg.CodeParameter>
-
copy
- 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<io.github.mmm.code.api.arg.CodeParameter>- Specified by:
copyin interfaceio.github.mmm.code.api.copy.CodeNodeItemCopyable<io.github.mmm.code.api.member.CodeOperation, io.github.mmm.code.api.arg.CodeParameters>
-
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:
-