Class SafeSymbolAccess
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase5.SafeSymbolAccess
- Direct Known Subclasses:
AssignmentStatementOrError, ContainerUnwrapObligations, ObjectAccessExpressionValidOrError
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SafeGenericAccessMarkerprotected final SafeGenericAccessPredicateFields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionSafeSymbolAccess(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisAccessUnSafe(ISymbol calledFromSymbol, String methodName) protected booleanrequiresSafeAccess(ISymbol calledFromSymbol, String methodName) WhethermethodNameoncalledFromSymbolis a container-unwrap that needs a preceding safety check (Optional.get,Result.ok/error,Iterator.nexton a symbol the marker has flagged) — i.e.Methods inherited from class TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Field Details
-
safeGenericAccessMarker
-
safeGenericAccessPredicate
-
-
Constructor Details
-
SafeSymbolAccess
SafeSymbolAccess(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
isAccessUnSafe
-
requiresSafeAccess
WhethermethodNameoncalledFromSymbolis a container-unwrap that needs a preceding safety check (Optional.get,Result.ok/error,Iterator.nexton a symbol the marker has flagged) — i.e. an unwrap obligation exists here, independent of whether it is discharged.isAccessUnSafe(ISymbol, String)then answers whether that obligation is undischarged (unguarded). Split out so the obligation census can count the obligation and read its discharge from the same source of truth theE08030checker uses.
-