Record Class LocationContext
java.lang.Object
java.lang.Record
org.ek9lang.mcp.oracle.LocationContext
public record LocationContext(CompilableSource source, ParsedModule parsedModule, Optional<ISymbol> symbol, List<IScope> scopeChain, Optional<ISymbol> enclosingMethod, Optional<IAggregateSymbol> enclosingAggregate, ModuleScope moduleScope, Optional<IRModule> irModule)
extends Record
Complete semantic context at a source location.
Populated by LocationResolver, consumed by all Oracle query extractors.
-
Constructor Summary
ConstructorsConstructorDescriptionLocationContext(CompilableSource source, ParsedModule parsedModule, Optional<ISymbol> symbol, List<IScope> scopeChain, Optional<ISymbol> enclosingMethod, Optional<IAggregateSymbol> enclosingAggregate, ModuleScope moduleScope, Optional<IRModule> irModule) Creates an instance of aLocationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationContextempty()Create an empty context when the source file cannot be found.Returns the value of theenclosingAggregaterecord component.Returns the value of theenclosingMethodrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanWhether this context has a resolved symbol at the target location.irModule()Returns the value of theirModulerecord component.booleanisValid()Whether this context has a valid source and parsed module.Returns the value of themoduleScoperecord component.Returns the value of theparsedModulerecord component.Returns the value of thescopeChainrecord component.source()Returns the value of thesourcerecord component.symbol()Returns the value of thesymbolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LocationContext
public LocationContext(CompilableSource source, ParsedModule parsedModule, Optional<ISymbol> symbol, List<IScope> scopeChain, Optional<ISymbol> enclosingMethod, Optional<IAggregateSymbol> enclosingAggregate, ModuleScope moduleScope, Optional<IRModule> irModule) Creates an instance of aLocationContextrecord class.- Parameters:
source- the value for thesourcerecord componentparsedModule- the value for theparsedModulerecord componentsymbol- the value for thesymbolrecord componentscopeChain- the value for thescopeChainrecord componentenclosingMethod- the value for theenclosingMethodrecord componentenclosingAggregate- the value for theenclosingAggregaterecord componentmoduleScope- the value for themoduleScoperecord componentirModule- the value for theirModulerecord component
-
-
Method Details
-
empty
Create an empty context when the source file cannot be found. -
hasSymbol
public boolean hasSymbol()Whether this context has a resolved symbol at the target location. -
isValid
public boolean isValid()Whether this context has a valid source and parsed module. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
parsedModule
Returns the value of theparsedModulerecord component.- Returns:
- the value of the
parsedModulerecord component
-
symbol
-
scopeChain
-
enclosingMethod
-
enclosingAggregate
Returns the value of theenclosingAggregaterecord component.- Returns:
- the value of the
enclosingAggregaterecord component
-
moduleScope
Returns the value of themoduleScoperecord component.- Returns:
- the value of the
moduleScoperecord component
-
irModule
-