java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.HiddenSpecification
- All Implemented Interfaces:
Externalizable
,Serializable
Hidden Specification.
Syntax: protection-specification = hidden identifier-list | protected identifier-list | hidden protected identifier-list | protected hidden identifier-listLink to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
- See Also:
-
Field Summary
Modifier 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
lineNumber
-
Constructor Summary
ConstructorDescriptionDefault constructor used by Externalization.HiddenSpecification
(ClassDeclaration definedIn, String identifier) Create a new HiddenSpecification. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform semantic checking.private static HiddenSpecification
findHidden
(ClassDeclaration scope, String ident) Search scope's hidden-list for 'ident'private ProtectedSpecification
Find protected attribute and update pointers.private ProtectedSpecification
Returns the ProtectedSpecification which protect this hidden.Utility: Get scope behind hidden.void
printTree
(int indent) Utility print syntax tree method.void
readExternal
(ObjectInput inpt) toString()
void
writeExternal
(ObjectOutput oupt) Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, doDeclarationCoding, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, SET_SEMANTICS_CHECKED, 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
public HiddenSpecification()Default constructor used by Externalization.
-
-
Method Details
-
getProtectedBy
Returns the ProtectedSpecification which protect this hidden.- Returns:
- the ProtectedSpecification which protect this hidden.
-
doChecking
public void doChecking()Perform semantic checking.Called from ClassDeclaration.checkHiddenList.
- Overrides:
doChecking
in classSyntaxClass
-
getMatchingProtected
Find protected attribute and update pointers.- Returns:
- the resulting ProtectedSpecification
-
getScopeBehindHidden
Utility: Get scope behind hidden.- Returns:
- the ClassDeclaration found
-
findHidden
Search scope's hidden-list for 'ident'- Parameters:
scope
- the given scopeident
- the given ident- Returns:
- the resulting HiddenSpecification
-
printTree
public void printTree(int indent) Description copied from class:SyntaxClass
Utility print syntax tree method.- Overrides:
printTree
in classSyntaxClass
- Parameters:
indent
- number of spaces leading the lines
-
toString
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-