Class ConnectionWhenPart
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.statement.ConnectionDoPart
simula.compiler.syntaxClass.statement.ConnectionWhenPart
Utility class to hold a when-part.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ClassDeclaration
The class declaration correspondig to the class identifier.(package private) String
The WHEN class-identifier(package private) boolean
Indicator to signal an impossible when-part.Fields inherited from class simula.compiler.syntaxClass.statement.ConnectionDoPart
connectionBlock, connectionStatement
Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
CHECKED, lineNumber, OBJECT_SEQU
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Default constructor used by Attribute File I/OConnectionWhenPart
(ConnectionStatement connectionStatement, String classIdentifier, ConnectionBlock connectionBlock, Statement statement) Create a new when-part. -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildByteCode
(CodeBuilder codeBuilder) Build Java ClassFile ByteCode.void
Perform semantic checking.void
doCoding
(boolean first) Perform Java coding.static ConnectionDoPart
Read and return a ConnectionDoPart object.toString()
void
Write a SyntaxClass object to a AttributeOutputStream.Methods inherited from class simula.compiler.syntaxClass.statement.ConnectionDoPart
printTree
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, doDeclarationCoding, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, SET_SEMANTICS_CHECKED, setLineNumber, toJavaCode
-
Field Details
-
classIdentifier
String classIdentifierThe WHEN class-identifier -
classDeclaration
ClassDeclaration classDeclarationThe class declaration correspondig to the class identifier. Set during checking. -
impossibleWhenPart
boolean impossibleWhenPartIndicator to signal an impossible when-part. Set during checking if object-expression is not compatible with the WHEN class.
-
-
Constructor Details
-
ConnectionWhenPart
public ConnectionWhenPart(ConnectionStatement connectionStatement, String classIdentifier, ConnectionBlock connectionBlock, Statement statement) Create a new when-part.- Parameters:
connectionStatement
- the connectionStatementclassIdentifier
- the WHEN class-identifierconnectionBlock
- The associated connection blockstatement
- the statement after DO
-
ConnectionWhenPart
private ConnectionWhenPart()Default constructor used by Attribute File I/O
-
-
Method Details
-
doChecking
public void doChecking()Description copied from class:ConnectionDoPart
Perform semantic checking.- Overrides:
doChecking
in classConnectionDoPart
-
doCoding
public void doCoding(boolean first) Description copied from class:ConnectionDoPart
Perform Java coding.- Overrides:
doCoding
in classConnectionDoPart
- Parameters:
first
- true if coding the first when-part
-
buildByteCode
Description copied from class:SyntaxClass
Build Java ClassFile ByteCode.- Overrides:
buildByteCode
in classConnectionDoPart
- Parameters:
codeBuilder
- the codeBuilder to use.
-
toString
- Overrides:
toString
in classConnectionDoPart
-
writeObject
Description copied from class:SyntaxClass
Write a SyntaxClass object to a AttributeOutputStream.- Overrides:
writeObject
in classConnectionDoPart
- Parameters:
oupt
- the AttributeOutputStream to write to.- Throws:
IOException
- if something went wrong.
-
readObject
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.
-