Package org.benf.cfr.reader.api
Class CfrDriver.Builder
- java.lang.Object
-
- org.benf.cfr.reader.api.CfrDriver.Builder
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Options
builtOptions
(package private) boolean
fallbackToDefaultSource
(package private) OutputSinkFactory
output
(package private) ClassFileSource
source
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CfrDriver
build()
Given provided artifacts, build an instance ofCfrDriver
.CfrDriver.Builder
withBuiltOptions(Options options)
Note - theOptions
interface is *not* guaranteed to be stable.CfrDriver.Builder
withClassFileSource(ClassFileSource source)
Overrides where CFR searches for bytecode.CfrDriver.Builder
withOptions(java.util.Map<java.lang.String,java.lang.String> options)
A map, equivalent to the command line options that are passed to CFR.CfrDriver.Builder
withOutputSink(OutputSinkFactory output)
Handle how results / output are provided.CfrDriver.Builder
withOverrideClassFileSource(ClassFileSource source)
Allows overrides of where CFR searches for bytecode, but will fall back to default behaviour if null is returned.
-
-
-
Field Detail
-
source
ClassFileSource source
-
builtOptions
Options builtOptions
-
output
OutputSinkFactory output
-
fallbackToDefaultSource
boolean fallbackToDefaultSource
-
-
Method Detail
-
withClassFileSource
public CfrDriver.Builder withClassFileSource(ClassFileSource source)
Overrides where CFR searches for bytecode. SeeClassFileSource
.- Parameters:
source
- class file source.- Returns:
- this builder.
-
withOverrideClassFileSource
public CfrDriver.Builder withOverrideClassFileSource(ClassFileSource source)
Allows overrides of where CFR searches for bytecode, but will fall back to default behaviour if null is returned. SeeClassFileSource
.- Parameters:
source
- class file source.- Returns:
- this builder.
-
withOutputSink
public CfrDriver.Builder withOutputSink(OutputSinkFactory output)
Handle how results / output are provided.- Parameters:
output
- seeOutputSinkFactory
- Returns:
- this builder.
-
withOptions
public CfrDriver.Builder withOptions(java.util.Map<java.lang.String,java.lang.String> options)
A map, equivalent to the command line options that are passed to CFR. Note. Strong values on this are not guaranteed, however you should expect that command line options to CFR do not change. eg { "sugarboxing" -> "false" } You may use { OptionsImpl.SUGAR_BOXING.getName() -> "false" } However, this is not guaranteed to remain in place currently, and may lead to compile / runtime errors in subsequent versions.- Parameters:
options
- map of options- Returns:
- this builder.
-
withBuiltOptions
public CfrDriver.Builder withBuiltOptions(Options options)
Note - theOptions
interface is *not* guaranteed to be stable.- Parameters:
options
- previously built options.- Returns:
- this builder.
-
-