Class BaseConstructor

All Implemented Interfaces:
io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.copy.CodeNodeItemCopyable<io.github.mmm.code.api.member.CodeConstructors, io.github.mmm.code.api.member.CodeConstructor>, io.github.mmm.code.api.element.CodeElement, io.github.mmm.code.api.element.CodeElementWithDeclaringType, io.github.mmm.code.api.element.CodeElementWithModifiers, io.github.mmm.code.api.element.CodeElementWithName, io.github.mmm.code.api.element.CodeElementWithTypeVariables, 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.CodeItemWithModifiers, io.github.mmm.code.api.item.CodeItemWithName, io.github.mmm.code.api.item.CodeItemWithType, io.github.mmm.code.api.item.CodeItemWithVariables, io.github.mmm.code.api.item.CodeMutableItem, io.github.mmm.code.api.item.CodeMutableItemWithComment, io.github.mmm.code.api.member.CodeConstructor, io.github.mmm.code.api.member.CodeMember, io.github.mmm.code.api.member.CodeOperation, io.github.mmm.code.api.merge.CodeAdvancedMergeableItem<io.github.mmm.code.api.member.CodeConstructor>, io.github.mmm.code.api.merge.CodeMergeableItem<io.github.mmm.code.api.member.CodeConstructor>, io.github.mmm.code.api.node.CodeFunction, io.github.mmm.code.api.node.CodeNode, io.github.mmm.code.api.node.CodeNodeItem, io.github.mmm.code.api.object.CodeMutable

public class BaseConstructor extends BaseOperation implements io.github.mmm.code.api.member.CodeConstructor
Base implementation of CodeConstructor.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Constructor Details

  • Method Details

    • getParent

      public BaseConstructors getParent()
      Specified by:
      getParent in interface io.github.mmm.code.api.member.CodeMember
      Specified by:
      getParent in interface io.github.mmm.code.api.node.CodeNode
      Specified by:
      getParent in interface io.github.mmm.code.api.copy.CodeNodeItemCopyable<io.github.mmm.code.api.member.CodeConstructors, io.github.mmm.code.api.member.CodeConstructor>
      Specified by:
      getParent in interface io.github.mmm.code.api.member.CodeOperation
      Specified by:
      getParent in class BaseOperation
    • getReflectiveObject

      public Constructor<?> getReflectiveObject()
      Specified by:
      getReflectiveObject in interface io.github.mmm.code.api.member.CodeConstructor
      Specified by:
      getReflectiveObject in interface io.github.mmm.code.api.element.CodeElementWithTypeVariables
      Specified by:
      getReflectiveObject in interface io.github.mmm.code.api.member.CodeMember
      Specified by:
      getReflectiveObject in interface io.github.mmm.code.api.item.CodeMutableItem
      Specified by:
      getReflectiveObject in interface io.github.mmm.code.api.member.CodeOperation
      Specified by:
      getReflectiveObject in class BaseOperation
    • getSourceCodeObject

      public io.github.mmm.code.api.member.CodeConstructor getSourceCodeObject()
      Specified by:
      getSourceCodeObject in class BaseOperation
      Returns:
      the optional internal CodeItem representing the source-code (to merge). Otherwise null. This is an internal API. Do not use or rely on it from outside.
    • getName

      public String getName()
      Specified by:
      getName in interface io.github.mmm.code.api.item.CodeItemWithName
      Overrides:
      getName in class BaseMember
    • setName

      public void setName(String name)
      Specified by:
      setName in interface io.github.mmm.code.api.member.CodeConstructor
      Specified by:
      setName in interface io.github.mmm.code.api.element.CodeElementWithName
      Overrides:
      setName in class BaseMember
    • merge

      public io.github.mmm.code.api.member.CodeConstructor merge(io.github.mmm.code.api.member.CodeConstructor other, io.github.mmm.code.api.merge.CodeMergeStrategyDecider decider, io.github.mmm.code.api.merge.CodeMergeStrategy parentStrategy)
      Specified by:
      merge in interface io.github.mmm.code.api.merge.CodeAdvancedMergeableItem<io.github.mmm.code.api.member.CodeConstructor>
    • copy

      public BaseConstructor copy()
      Specified by:
      copy in interface io.github.mmm.code.api.member.CodeConstructor
      Specified by:
      copy in interface io.github.mmm.code.api.element.CodeElement
      Specified by:
      copy in interface io.github.mmm.code.api.element.CodeElementWithDeclaringType
      Specified by:
      copy in interface io.github.mmm.code.api.element.CodeElementWithModifiers
      Specified by:
      copy in interface io.github.mmm.code.api.element.CodeElementWithName
      Specified by:
      copy in interface io.github.mmm.code.api.element.CodeElementWithTypeVariables
      Specified by:
      copy in interface io.github.mmm.code.api.member.CodeMember
      Specified by:
      copy in interface io.github.mmm.code.api.item.CodeMutableItem
      Specified by:
      copy in interface io.github.mmm.code.api.node.CodeNodeItem
      Specified by:
      copy in interface io.github.mmm.code.api.copy.CodeNodeItemCopyable<io.github.mmm.code.api.member.CodeConstructors, io.github.mmm.code.api.member.CodeConstructor>
      Specified by:
      copy in interface io.github.mmm.code.api.member.CodeOperation
      Specified by:
      copy in class BaseOperation
    • copy

      public BaseConstructor copy(io.github.mmm.code.api.copy.CodeCopyMapper mapper)
      Specified by:
      copy in interface io.github.mmm.code.api.item.CodeMutableItem
      Specified by:
      copy in interface io.github.mmm.code.api.node.CodeNodeItem
      Specified by:
      copy in interface io.github.mmm.code.api.copy.CodeNodeItemCopyable<io.github.mmm.code.api.member.CodeConstructors, io.github.mmm.code.api.member.CodeConstructor>
    • 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)