Create a new builder instance.
Optional
request: RAnalysisRequest | readonly RAnalysisRequest[]The code to analyze
Add one or multiple requests to analyze. This is a convenience method that uses addRequest and addRequestFromInput internally.
One or multiple requests or a file path (with the file://
protocol). If you just enter a string, it will be interpreted as R code.
Add one or multiple requests to analyze the builder.
Add a request created from the given input. This is a convenience method that uses requestFromInput internally.
Apply an amendment to the configuration the builder currently holds. Per default, the defaultConfigOptions are used.
Receives the current configuration of the builder and allows for amendment.
Create the FlowrAnalyzer instance using the given information.
Please note that the only reason this is async
is that if no parser is set,
we need to retrieve the default engine instance which is an async operation.
If you set the parser using FlowrAnalyzerBuilder#setParser,
Synchronous version of FlowrAnalyzerBuilder#build, please only use this if you have set the parser using FlowrAnalyzerBuilder#setParser before, otherwise an error will be thrown.
Register one or multiple additional plugins.
FlowrAnalyzerBuilder#unregisterPlugins to remove plugins.
Overwrite the configuration used by the resulting analyzer.
The new configuration.
Set the engine and hence the parser that will be used by the analyzer. This is an alternative to FlowrAnalyzerBuilder#setParser if you do not have a parser instance at hand.
Additional parameters for the analyses.
The input.
Set the parser instance used by the analyzer. This is an alternative to FlowrAnalyzerBuilder#setEngine if you already have a parser instance. Please be aware, that if you want to parallelize multiple analyzers, there should be separate parser instances.
Remove one or multiple plugins.
Builder for the FlowrAnalyzer, use it to configure all analysis aspects before creating the analyzer instance with
.build()
or.buildSync()
.You can add new files and folders to analyze using the constructor or the
.add()
method.Example: Let's create an analyzer for a single R script file:
If you now want to get the dataflow information for the file, you can do this: