Class BaseOperation

All Implemented Interfaces:
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.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.CodeMember, io.github.mmm.code.api.member.CodeOperation, 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
Direct Known Subclasses:
BaseConstructor, BaseMethod

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

  • Method Details

    • getParent

      public abstract BaseOperations<?> 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.member.CodeOperation
      Specified by:
      getParent in class BaseMember
    • getVariable

      public io.github.mmm.code.api.expression.CodeVariable getVariable(String name)
      Specified by:
      getVariable in interface io.github.mmm.code.api.item.CodeItemWithVariables
    • doSetImmutable

      protected void doSetImmutable()
      Description copied from class: BaseMutableItem
      Called on the first call of BaseMutableItem.setImmutable(). Has to be overridden to update Collections, make child items immutable, etc.
      Overrides:
      doSetImmutable in class BaseElement
    • getTypeParameters

      public BaseTypeVariables getTypeParameters()
      Specified by:
      getTypeParameters in interface io.github.mmm.code.api.element.CodeElementWithTypeVariables
    • getParameters

      public BaseParameters getParameters()
      Specified by:
      getParameters in interface io.github.mmm.code.api.member.CodeOperation
    • getExceptions

      public BaseExceptions getExceptions()
      Specified by:
      getExceptions in interface io.github.mmm.code.api.member.CodeOperation
    • getBody

      public io.github.mmm.code.api.block.CodeBlockBody getBody()
      Specified by:
      getBody in interface io.github.mmm.code.api.node.CodeFunction
    • setBody

      public void setBody(io.github.mmm.code.api.block.CodeBlockBody body)
      Specified by:
      setBody in interface io.github.mmm.code.api.node.CodeFunction
    • getReflectiveObject

      public abstract Executable getReflectiveObject()
      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 BaseMember
    • getSourceCodeObject

      public abstract io.github.mmm.code.api.member.CodeOperation getSourceCodeObject()
      Specified by:
      getSourceCodeObject in class BaseMember
      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.
    • doMerge

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

      public abstract BaseOperation copy()
      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.member.CodeOperation
      Specified by:
      copy in class BaseMember
    • canHaveBody

      public boolean canHaveBody()
      Specified by:
      canHaveBody in interface io.github.mmm.code.api.node.CodeFunction