Class AccessToSymbolOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.AccessToSymbolOrError
- All Implemented Interfaces:
Consumer<SymbolAccessData>
Check that a symbol can be accessed issues error if not possible.
isAccessible(SymbolAccessData) is THE access rule (private: only from within the same type; protected:
only from within the same type hierarchy; public: anywhere). A check that must report a denial under its own,
clearer code (E07835 for collect as T) asks the predicate rather than re-deriving the rule.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionAccessToSymbolOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(SymbolAccessData symbolAccessData) (package private) static booleanisAccessible(SymbolAccessData symbolAccessData) THE access rule: may the symbol be reached from the scope the access is made in.Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
AccessToSymbolOrError
AccessToSymbolOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<SymbolAccessData>
-
isAccessible
THE access rule: may the symbol be reached from the scope the access is made in.
-