Class ProtectedSpecification
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.ProtectedSpecification
Protected Specification.
Syntax: protection-specification = hidden identifier-list | protected identifier-list | hidden protected identifier-list | protected hidden identifier-list
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe owner.(package private) HiddenSpecification
Set during doChecking.The protected identifier.Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
CHECKED, lineNumber, OBJECT_SEQU
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Default constructor used by Attribute File I/OProtectedSpecification
(ClassDeclaration definedIn, String identifier) Create a new ProtectedSpecification. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform semantic checking.private Declaration
Returns the Attribute being Protected.private VirtualSpecification
Returns the virtual specification or null.void
Utility print syntax tree method.static ProtectedSpecification
Read and return a ProtectedSpecification object.toString()
void
Write a SyntaxClass object to a AttributeOutputStream.Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, buildByteCode, doDeclarationCoding, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, SET_SEMANTICS_CHECKED, setLineNumber, toJavaCode
-
Field Details
-
identifier
The protected identifier. -
definedIn
The owner.
-
-
Constructor Details
-
ProtectedSpecification
Create a new ProtectedSpecification.- Parameters:
definedIn
- the class it is defined inidentifier
- the protected identifier
-
ProtectedSpecification
private ProtectedSpecification()Default constructor used by Attribute File I/O
-
-
Method Details
-
getAttribute
Returns the Attribute being Protected.- Returns:
- the Attribute being Protected
-
getVirtualSpecification
Returns the virtual specification or null.
The Attribute being Protected may be Virtual.
- Returns:
- the virtual specification or null
-
doChecking
-
printTree
Description copied from class:SyntaxClass
Utility print syntax tree method.- Overrides:
printTree
in classSyntaxClass
- Parameters:
indent
- number of spaces leading the lineshead
- the head of the tree.
-
toString
-
writeObject
Description copied from class:SyntaxClass
Write a SyntaxClass object to a AttributeOutputStream.- Overrides:
writeObject
in classSyntaxClass
- Parameters:
oupt
- the AttributeOutputStream to write to.- Throws:
IOException
- if something went wrong.
-
readObject
Read and return a ProtectedSpecification object.- Parameters:
inpt
- the AttributeInputStream to read from- Returns:
- the object read from the stream.
- Throws:
IOException
- if something went wrong.
-