Class HiddenSpecification
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.HiddenSpecification
Hidden 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 TypeFieldDescription(package private) ClassDeclaration
The class in which this HiddenSpecification occur.The hidden identifier.private ProtectedSpecification
The ProtectedSpecification set during doCheckingFields inherited from class simula.compiler.syntaxClass.SyntaxClass
CHECKED, lineNumber, OBJECT_SEQU
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Default constructor used by Attribute File I/OHiddenSpecification
(ClassDeclaration definedIn, String identifier) Create a new HiddenSpecification. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Utility: Perform semantic checking.private static HiddenSpecification
findHidden
(ClassDeclaration scope, String ident) Utility: findHidden -- Search scope's hidden-list for 'ident'private ProtectedSpecification
Utility: Find protected attribute and update pointers.private ProtectedSpecification
Returns the ProtectedSpecification which protect this hidden.Utility: getScopeBehindHiddenvoid
Utility print syntax tree method.static HiddenSpecification
Read and return a HiddenSpecification 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 hidden identifier. -
definedIn
ClassDeclaration definedInThe class in which this HiddenSpecification occur. -
protectedBy
The ProtectedSpecification set during doChecking
-
-
Constructor Details
-
HiddenSpecification
Create a new HiddenSpecification.- Parameters:
definedIn
- the class where Hidden is specifiedidentifier
- the hidden identifier
-
HiddenSpecification
private HiddenSpecification()Default constructor used by Attribute File I/O
-
-
Method Details
-
getProtectedBy
Returns the ProtectedSpecification which protect this hidden.- Returns:
- the ProtectedSpecification which protect this hidden.
-
doChecking
public void doChecking()Utility: Perform semantic checking. Called from ClassDeclaration.checkHiddenList.- Overrides:
doChecking
in classSyntaxClass
-
getMatchingProtected
Utility: Find protected attribute and update pointers.- Returns:
- the resulting ProtectedSpecification
-
getScopeBehindHidden
Utility: getScopeBehindHidden -- Search backwards from 'hidden' ...- Returns:
- the ClassDeclaration found
-
findHidden
Utility: findHidden -- Search scope's hidden-list for 'ident'- Parameters:
scope
- the given scopeident
- the given ident- Returns:
- the resulting HiddenSpecification
-
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 HiddenSpecification object.- Parameters:
inpt
- the AttributeInputStream to read from- Returns:
- the object read from the stream.
- Throws:
IOException
- if something went wrong.
-