ReadonlyconfigThe configuration options used by the analyzer.
ReadonlydepsIdentified dependencies and their versions.
ReadonlyenvEnvironment information used during analysis.
ReadonlyfilesFiles to be analyzed and their loading order.
ReadonlygasResource-usage guard (gas).
Call ctx.gas.checkGas(key) at expensive analysis sites to obtain the current pressure level.
Returns GasLevel.Normal with zero overhead when gas is disabled for key.
ReadonlymetaProject metadata such as name, version, and namespace.
Provides the analyzer associated with this context, if any.
This is usually set when the context is used within an analyzer instance.
Please note, that this may be undefined if the context is used standalone (e.g., during setup or in plugins that do not have access to the analyzer).
Get a read-only version of this context. This is useful if you want to pass the context to a place where you do not want it to be modified or just to reduce the available methods.
Reset the context to its initial state, e.g., removing all files, dependencies, and loading orders.
This summarizes the other context layers used by the FlowrAnalyzer. Have a look at the attributes and layers listed below (e.g., files and deps) to get an idea of the capabilities provided by this context. Besides these, this layer only orchestrates the different steps and layers, providing a collection of convenience methods. In general, you do not have to worry about these details, as the FlowrAnalyzerBuilder and FlowrAnalyzer take care of them.
To inspect, e.g., the loading order, you can do so via files.loadingOrder.getLoadingOrder. To get information on a specific library, use deps.getDependency. If you are just interested in inspecting the context, you can use ReadOnlyFlowrAnalyzerContext instead (e.g., via inspect).