Class ConnectionDoPart

java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.statement.ConnectionDoPart
Direct Known Subclasses:
ConnectionWhenPart

public class ConnectionDoPart extends SyntaxClass
Utility class to hold the single Connection do-part.
  • Field Details

    • connectionStatement

      ConnectionStatement connectionStatement
      The associated connection statement.
    • connectionBlock

      public ConnectionBlock connectionBlock
      The associated connection block.
  • Constructor Details

    • ConnectionDoPart

      ConnectionDoPart(ConnectionStatement connectionStatement, ConnectionBlock connectionBlock, Statement statement)
      Create a new do-part.
      Parameters:
      connectionStatement - The owner.
      connectionBlock - The associated connection block
      statement - the statement after DO
    • ConnectionDoPart

      protected ConnectionDoPart()
      Default constructor used by Attribute File I/O
  • Method Details

    • doChecking

      public void doChecking()
      Perform semantic checking.
      Overrides:
      doChecking in class SyntaxClass
    • doCoding

      public void doCoding(boolean first)
      Perform Java coding.
      Parameters:
      first - true if coding the first when-part
    • buildByteCode

      public void buildByteCode(CodeBuilder codeBuilder)
      Description copied from class: SyntaxClass
      Build Java ClassFile ByteCode.
      Overrides:
      buildByteCode in class SyntaxClass
      Parameters:
      codeBuilder - the codeBuilder to use.
    • printTree

      public void printTree(int indent, Object head)
      Utility print method.
      Overrides:
      printTree in class SyntaxClass
      Parameters:
      indent - the indent
      head - the head of the tree.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • writeObject

      public void writeObject(AttributeOutputStream oupt) throws IOException
      Description copied from class: SyntaxClass
      Write a SyntaxClass object to a AttributeOutputStream.
      Overrides:
      writeObject in class SyntaxClass
      Parameters:
      oupt - the AttributeOutputStream to write to.
      Throws:
      IOException - if something went wrong.
    • readObject

      public static ConnectionDoPart readObject(AttributeInputStream inpt) throws IOException
      Read and return a ConnectionDoPart object.
      Parameters:
      inpt - the AttributeInputStream to read from
      Returns:
      the ConnectionDoPart object read from the stream.
      Throws:
      IOException - if something went wrong.