Class BaseOperationArg

All Implemented Interfaces:
io.github.mmm.code.api.arg.CodeOperationArg, io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.element.CodeElement, io.github.mmm.code.api.element.CodeElementWithDeclaringType, io.github.mmm.code.api.item.CodeItem, io.github.mmm.code.api.item.CodeItemWithComment, io.github.mmm.code.api.item.CodeItemWithDeclaringType, io.github.mmm.code.api.item.CodeItemWithType, io.github.mmm.code.api.item.CodeMutableItem, io.github.mmm.code.api.item.CodeMutableItemWithComment, io.github.mmm.code.api.item.CodeMutableItemWithType, io.github.mmm.code.api.node.CodeNode, io.github.mmm.code.api.node.CodeNodeItem, io.github.mmm.code.api.node.CodeNodeItemWithDeclaringOperation, io.github.mmm.code.api.object.CodeMutable
Direct Known Subclasses:
BaseException, BaseParameter, BaseReturn

public abstract class BaseOperationArg extends BaseElementWithDeclaringType implements io.github.mmm.code.api.arg.CodeOperationArg
Base implementation of CodeOperationArg.
Since:
1.0.0
Author:
hohwille
  • Constructor Details

    • BaseOperationArg

      public BaseOperationArg()
      The constructor.
    • BaseOperationArg

      public BaseOperationArg(BaseOperationArg template, io.github.mmm.code.api.copy.CodeCopyMapper mapper)
      The copy-constructor.
      Parameters:
      template - the BaseOperationArg to copy.
      mapper - the CodeCopyMapper.
  • Method Details

    • doInitialize

      protected void doInitialize()
      Description copied from class: BaseNodeItem
      Called from BaseMutableItem.initialize() on first invocation. May be overridden but never be called from anywhere else.
      Overrides:
      doInitialize in class BaseElement
    • getDeclaringOperation

      public abstract BaseOperation getDeclaringOperation()
      Specified by:
      getDeclaringOperation in interface io.github.mmm.code.api.node.CodeNodeItemWithDeclaringOperation
    • getType

      public BaseGenericType getType()
      Specified by:
      getType in interface io.github.mmm.code.api.item.CodeItemWithType
    • getDefaultType

      protected BaseType getDefaultType()
      Returns:
      the default type to use if type was not set.
    • setType

      public void setType(io.github.mmm.code.api.type.CodeGenericType type)
      Specified by:
      setType in interface io.github.mmm.code.api.item.CodeMutableItemWithType
    • getReflectiveObjectType

      protected abstract Type getReflectiveObjectType()
      Returns:
      the argument Type of the reflective object.
      See Also:
    • doMerge

      protected void doMerge(io.github.mmm.code.api.arg.CodeOperationArg other, io.github.mmm.code.api.merge.CodeMergeStrategy strategy)
      Parameters:
      other - the CodeOperationArg to merge.
      strategy - the CodeMergeStrategy.
      See Also:
    • doWrite

      protected void doWrite(Appendable sink, String newline, String defaultIndent, String currentIndent, io.github.mmm.code.api.language.CodeLanguage language) throws IOException
      Overrides:
      doWrite in class BaseElement
      Parameters:
      sink - the Appendable where to append the code from this CodeItem.
      newline - the newline String.
      defaultIndent - the String used 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 the defaultIndent will be appended.
      language - the CodeLanguage to use.
      Throws:
      IOException - if thrown by Appendable.
      See Also:
      • CodeItem.write(Appendable, String, String)
    • doWriteDeclaration

      protected void doWriteDeclaration(Appendable sink, String newline, String defaultIndent, String currentIndent, io.github.mmm.code.api.language.CodeLanguage language) throws IOException
      Parameters:
      sink - the Appendable where to append the code from this CodeItem.
      newline - the newline String.
      defaultIndent - the String used 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 the defaultIndent will be appended.
      language - the CodeLanguage to use.
      Throws:
      IOException - if thrown by Appendable.